<include file="Public:header" />
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title"  class="col-md-6">
            <h5>转账日志</h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->
            <form id='commentForm' role="form" method="get" class="form-inline">
                <div class="content clearfix m-b">
                    <div class="form-group">
                        <label>用户名：</label>
                        <input type="text" class="form-control" id="username" name="username" value="{$Think.get.username}">
                    </div>
                    <div class="form-group">
                        <button class="btn btn-primary" type="submit" style="margin-top:5px" id="search"><strong>搜 索</strong>
                        </button>
                    </div>
                </div>
            </form>
            <!--搜索框结束-->
            <div class="hr-line-dashed"></div>
				<div class="example-wrap">
					<div class="example">
						<div class="bootstrap-table">
							<div class="fixed-table-container" style="height: 641px; padding-bottom: 36px;">
								<div class="fixed-table-header" style="margin-right: 0px;"></div>
								<div class="fixed-table-body">
									<table id="cusTable" data-height="700" class="table table-hover table-striped">
										<thead>
											<th tabindex="0">
												<div class="th-inner ">序号</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">用户名</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">提现金额</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">提现手续费</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">收款方式</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">收款账号</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">持有人姓名</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">详细信息</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">备注</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">支付宝</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">微信</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">状态</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">提现时间</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">审核时间</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">操作</div>
											</th>
										</thead>
										<tbody>
											<volist name="list['content']" id="vo" key="k">
											<tr role="row">
												<td>{$k}</td>
												<td>{$vo['user']['username']}</td>
												<td>{$vo['num']}</td>
												<td>{$vo['fee']}</td>
												<td>{$vo['bank']['type']}</td>
												<td>{$vo['bank']['card']}</td>
												<td>{$vo['bank']['realname']}</td>
												<td>{$vo['bank']['address']}</td>
												<td>{$vo['remark']}</td>
												<td>{$vo['user']['zhifubao']}</td>
												<td>{$vo['user']['wechat']}</td>
												<td>{$vo['status']|getWithdrawalsStatus}</td>
												<td>{$vo['add_time']|getDateFormat=###}</td>
												<td>{$vo['active_time']|getDateFormat=###}</td>
												<td>
													<eq name="vo['status']" value="0">
														<button id="btn-confirm" class="btn btn-info marginR10 marginL10" onclick="yes('{$vo['id']}')">审核通过</button>
														<button id="btn-confirm" class="btn btn-danger marginR10 marginL10" onclick="no('{$vo['id']}')">审核不通过</button>
													</eq>
												</td>
											</tr>
											</volist>
											<tr><td colspan="15">{$list['page']}</td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="pull-right pagination"></div>
							</div>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
				<script type="text/javascript">
								function yes(id){
								layer.confirm('审核通过?', {
								  btn: ['确认','取消'] //按钮
								}, function(){
									$.ajax({
										 type: "POST",
										 url: "{:U('UserMoney/withdrawalsYes')}",
										 data: {'id':id},
										 dataType: "json",
										 error: function(request) {
											layer.closeAll('loading');
											layer.alert("{$Think.lang.系统繁忙请稍后再试}");
										},
										beforeSend: function() {
											var index = layer.load(1, {
											  shade: [0.1,'#fff'] 
											});
										},
										 success: function(data){
												layer.closeAll('loading');
												layer.alert(data['info']);
												if(data['status']==true){
													setTimeout(history.go(0),1000);
												}
											}
									});
								});
							};
								function no(id){
								layer.confirm('审核不通过?', {
								  btn: ['确认','取消'] //按钮
								}, function(){
									$.ajax({
										 type: "POST",
										 url: "{:U('UserMoney/withdrawalsNo')}",
										 data: {'id':id},
										 dataType: "json",
										 error: function(request) {
											layer.closeAll('loading');
											layer.alert("{$Think.lang.系统繁忙请稍后再试}");
										},
										beforeSend: function() {
											var index = layer.load(1, {
											  shade: [0.1,'#fff'] 
											});
										},
										 success: function(data){
												layer.closeAll('loading');
												layer.alert(data['info']);
												if(data['status']==true){
													setTimeout(history.go(0),1000);
												}
											}
									});
								});
							};
				</script>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>
<include file="Public:footer" />
<script type="text/javascript">
    function shopUserDel(id){
        layer.confirm('确认删除此商户账号?', {icon: 3, title:'提示'}, function(index){
            //do something
            $.getJSON("{:U('shopUser/delete')}", {'shopID' : id}, function(res){
                if(res.status == true){
                    layer.alert('删除成功');location.reload(); 
                }else{
                    layer.alert('删除失败');
                }
            }); 
            layer.close(index);
        })

    }
</script>
</body>
</html>